package com.lz.ionicbase.utils;

import android.app.Dialog;
import android.content.Context;

/**
 * Created by lenovo on 2017/2/16.
 */

public class ControlLoading {

    private static Dialog dialog;

    public static void showDialog(Context context, String text){
        if (dialog == null){
            dialog = LoadingDialog.createLoadingDialog(context, text);
            dialog.show();
        }
    }
    public static void closeDialog(){
        if (dialog!=null){
            dialog.dismiss();
            dialog=null;
        }
    }
}
